import http from '../utils/httputils'

const addressService = {
  /**
   * 获取地址
   */
  getAddress:() =>{
    return http.getRequest({
      url:`locations/user/address`
    });
  },
  /**
   * 新增地址
   */
  addAddress:(params) =>{
    return http.postRequest({
      url:`locations/user/address`,
      params:params
    });
  },
  /**
   * 更新地址
   */
  updateAddress:(params) =>{
    return http.putRequest({
      url:`locations/user/address`,
      params:params
    });
    /**
     * 删除地址
     */
  },
  deleteAddress:(id) =>{
    return http.deleteRequest({
      url:`locations/user/address/${id}`,
    });
  }
}
export default addressService;